home *** CD-ROM | disk | FTP | other *** search
- 'Array to hold cust forms
-
- Const MAX_CUST = 3
- Global CustFormItems(MAX_CUST) As FormItem
- Global CustForms(MAX_CUST) As CustForm
-
- Global CustSchema() As TABLESCHEMA
-
- Sub CustOpen (fname As String, tbname As String)
-
- ' Create a new customer form by allocating a form,
- ' setting up tables and passing control to the
- ' form itself.
-
- If Not FormAvail(CustFormItems()) Then
- MsgBox "Cannot open more customer forms"
- Exit Sub
- End If
-
- i% = FormAlloc(CustFormItems())
- CustFormItems(i%).fiFileName = fname
- CustFormItems(i%).fiTable = tbname
-
- Set CustForms(i%) = New CustForm
- CustForms(i%).Show
- CustForms(i%).Caption = "[" + ExtractBase(fname) + "]" + TnameDisp(tbname)
-
- End Sub
-
- Sub InitCust ()
-
- ' Initialize form structures and define the customer
- ' field layout
-
- FormInit CustFormItems()
-
- ReDim CustSchema(2)
-
- CustSchema(1).tsName = "CustNo"
- CustSchema(1).tsType = DB_LONG
-
- CustSchema(2).tsName = "CustName"
- CustSchema(2).tsType = DB_TEXT
- CustSchema(2).tsSize = 80
-
- End Sub
-
-